{% load cms_tags sekizai_tags %}
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>{% placeholder "TITLE" %}{% block title %}{% endblock %}</title>
{% block head_quote %}{% endblock %}
{% render_block "css" %}
<link rel="stylesheet" href="//img.ztm.me/weui/weui.css"/>
<link rel="stylesheet" href="//img.ztm.me/weui/example.css"/>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113208908-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-113208908-1');
</script>
<script type="text/javascript" src="//libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" src="/static/js/common.js"></script>
{% if jssdk_signature %}
<script type="text/javascript">
// var ua = navigator.userAgent.toLowerCase();
// alert(ua);
  wx.config({
  	debug: false,
  	appId: '{{jssdk_signature.appid}}',
    timestamp: '{{jssdk_signature.timestamp}}',
  	nonceStr: '{{jssdk_signature.nonce}}',
  	signature: '{{jssdk_signature.signature}}',
  	jsApiList: [
  		'checkJsApi',
  		'onMenuShareTimeline',
  		'onMenuShareAppMessage',
  		'onMenuShareQQ',
  		'onMenuShareWeibo',
  		'hideMenuItems',
  		'showMenuItems',
      'closeWindow'
  	]
  });
  // wx.ready(function () {
  // 	document.querySelector('#closeWindowButton').onclick = function () {
  //     wx.closeWindow();
  //   };
  // });
</script>
{% endif %}
<script type="text/javascript" class="dialog js_show">
    $(function(){
        $('#messages').on('click', '.weui-dialog__btn', function(){
            $(this).parents('.js_dialog').fadeOut(200);
        });
    });</script>
<!--自定义CSS&Javascript代码片段begin-->
{% placeholder "CUSTOM_CSS_JS" %}
{% block custom_css_js %}{% endblock %}
<!--自定义CSS&Javascript代码片段end-->
</head>
<body ontouchstart>
<!--
<div class="weui-toptips weui-toptips_warn js_tooltips">错误提示</div>
-->
{% if messages %}
{% for message in messages %}
<div id="messages">
  <div class="js_dialog" id="iosDialog1" style="opacity: 1;">
    <div class="weui-mask">
    </div>
    <div class="weui-dialog">
      <div class="weui-dialog__bd">
        {{ message }}
      </div>
      <div class="weui-dialog__ft">
        <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">知道了</a>
      </div>
    </div>
  </div>
</div>
{% endfor %}
{% endif %}
<div class="container" id="container"></div>
{% placeholder "BASE_CONTENT" %}
{% block base_content %}{% endblock %}
<div class="weui-footer">
  <p class="weui-footer__text">Copyright © 2016-2017 ztm.me</p>
</div>
{% render_block "js" %}
<br />
<a href="javascript:;" class="weui-btn weui-btn_plain-default" style="display:none;" id="closeWindowButton">关闭页面</a>
<script src="//img.ztm.me/weui/zepto.min.js"></script>
<script src="//img.ztm.me/weui/weui.min.js"></script>
</body>
</html>
